package com.xyht.medicine_management_system.modules.user.service;

import com.xyht.medicine_management_system.common.commonReturn.ResponseResult;
import com.xyht.medicine_management_system.modules.user.entity.ChangeUserPassword;
import com.xyht.medicine_management_system.modules.user.entity.MmsUser;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xyht.medicine_management_system.modules.user.entity.req.*;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author XYHT
 * @since 2023-11-12
 */
public interface MmsUserService extends IService<MmsUser> {
    /**
     * @description 账号登录 需要校验用户是否认证
     * @create 2023/11/16
     * @author dxn
     */
    ResponseResult webLogin(SmsUserLoginReq smsUserLoginReq);

    ResponseResult phoneLogin(SmsUserLoginReq smsUserLoginReq);

    ResponseResult phoneVerifyCode(String phoneNum);

    /**
     * @description 密码找回
     * @create 2023/11/16
     * @author dxn
     */
    ResponseResult findPassword(FindPasswordReq findPasswordReq);

    ResponseResult checkUserExist(SmsUserLoginReq smsUserLoginReq);

    ResponseResult userChangePasswordByOldPassword(String user_id, ChangeUserPassword changeUserPassword);

    ResponseResult userRegister(SmsUserRegisterReq registerReq);

    ResponseResult userPhoneRegister(SmsUserRegisterReq registerReq);

    ResponseResult getUserList(Integer userType, String searchStr, Integer pageNum, Integer pageSize);

    ResponseResult getUserDetail(String userId);

    ResponseResult addUser(MmsUserReq mmsUserReq);

    ResponseResult updateUser(MmsUserReq mmsUserReq);

    ResponseResult updateUserProfile(MmsUserReq mmsUserReq, String userId);

    ResponseResult updateUserNickName(MmsUserReq mmsUserReq, String userId);

    ResponseResult updateUserRole(UserRoleReq userRoleReq);

    ResponseResult getUserInfo(String userId);

    ResponseResult generateSelfInvitationCode(String userId);
}
